package com.xiaoxiao.regimen.provider;

import android.net.Uri;
import android.provider.BaseColumns;
import android.provider.ContactsContract.RawContacts;

/**
 * Constants for the regimen aggregation exception table, which contains
 * aggregation rules overriding those used by automatic aggregation. This
 * type only supports query and update. Neither insert nor delete are
 * supported.
 * 
 * @author jaroad
 *
 */
public final class AggregationExceptions implements BaseColumns {
    
    /**
     * This utility class cannot be instantiated
     */
    private AggregationExceptions() {}

    /**
     * The content:// style URI for this table
     */
    public static final Uri CONTENT_URI =
            Uri.withAppendedPath(RegimenContract.AUTHORITY_URI, "aggregation_exceptions");

    /**
     * The MIME type of {@link #CONTENT_URI} providing a directory of data.
     */
    public static final String CONTENT_TYPE = "vnd.android.cursor.dir/aggregation_exception";

    /**
     * The MIME type of a {@link #CONTENT_URI} subdirectory of an aggregation exception
     */
    public static final String CONTENT_ITEM_TYPE =
            "vnd.android.cursor.item/aggregation_exception";

    /**
     * The type of exception: {@link #TYPE_KEEP_TOGETHER}, {@link #TYPE_KEEP_SEPARATE} or
     * {@link #TYPE_AUTOMATIC}.
     *
     * <P>Type: INTEGER</P>
     */
    public static final String TYPE = "type";

    /**
     * Allows the provider to automatically decide whether the specified raw regimen should
     * be included in the same aggregate regimen or not.
     */
    public static final int TYPE_AUTOMATIC = 0;

    /**
     * Makes sure that the specified raw regimen are included in the same
     * aggregate regimen.
     */
    public static final int TYPE_KEEP_TOGETHER = 1;

    /**
     * Makes sure that the specified raw regimen are NOT included in the same
     * aggregate regimen.
     */
    public static final int TYPE_KEEP_SEPARATE = 2;

    /**
     * A reference to the {@link RawRegimen#_ID} of the raw regimen that the rule applies to.
     */
    public static final String RAW_REGIMEN_ID1 = "raw_regimen_id1";

    /**
     * A reference to the other {@link RawRegimen#_ID} of the raw regimen that the rule
     * applies to.
     */
    public static final String RAW_REGIMEN_ID2 = "raw_regimen_id2";
}
